package file;

import java.io.*;
import java.util.ArrayList;
import java.util.List;
import java.util.stream.Collectors;

/**
 * @Author shxl2021
 * @Date 2023/8/11 15:18
 * @Version 1.0
 */
public class FileOrder {
    //private static final String path="C:\\Users\\LENOVO\\AppData\\Roaming\\JetBrains\\IntelliJIdea2022.3\\scratches\\type-node\\archivemerge\\1473216提交sharding文件.txt";
    //private static final String path="C:\\Users\\LENOVO\\AppData\\Roaming\\JetBrains\\IntelliJIdea2022.3\\scratches\\type-node\\archivemerge\\最终部署文件";
    private static final String path = "C:\\Users\\LENOVO\\AppData\\Roaming\\JetBrains\\IntelliJIdea2022.3\\scratches\\type-node\\方太分支合并\\合并进程\\已合并";

    public static void main(String[] args) throws IOException {
        File file = new File(path);
        FileReader fileReader = new FileReader(file);
        BufferedReader bufferedReader = new BufferedReader(fileReader);
        String s = null;
        List<String> list = new ArrayList<>();
        while ((s = bufferedReader.readLine()) != null) {
            list.add(s);

        }
        list.stream().sorted().forEach(System.out::println);
    }
}
